]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginManager: Remove sessionActive property
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 3 Feb 2013 21:25:02 +0000 (22:25 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 4 Feb 2013 23:01:33 +0000 (00:01 +0100)
It is unused after switching to GnomeSession:SessionIsActive, so
remove it together with shell_session_is_active_for_systemd().

https://bugzilla.gnome.org/show_bug.cgi?id=693161

configure.ac
js/misc/loginManager.js
src/Makefile.am
src/shell-util.c
src/shell-util.h

index 1ffde2257de1ba9c7b080b0e0feabd0746979140..84fce9048f870cb79ffec73cd8a21e654f5fe2d7 100644 (file)
@@ -128,33 +128,6 @@ PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedatas
 AC_SUBST(CALENDAR_SERVER_CFLAGS)
 AC_SUBST(CALENDAR_SERVER_LIBS)
 
-AC_ARG_WITH(systemd,
-            AS_HELP_STRING([--with-systemd],
-                           [Add systemd support]),
-            [with_systemd=$withval], [with_systemd=auto])
-
-PKG_CHECK_MODULES(SYSTEMD,
-                  [libsystemd-login libsystemd-daemon],
-                  [have_systemd=yes], [have_systemd=no])
-
-if test "x$with_systemd" = "xauto" ; then
-        if test x$have_systemd = xno ; then
-                use_systemd=no
-        else
-                use_systemd=yes
-        fi
-else
-        use_systemd=$with_systemd
-fi
-
-if test "x$use_systemd" = "xyes"; then
-        if test "x$have_systemd" = "xno"; then
-                AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
-        fi
-
-        AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
-fi
-
 GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`
 AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])
 
index 7fc189f70df4b9fd7d6355a0cecb51e8c3c8a7c5..d1c7bd9bf832c7541fe9e58401ef34d476d9a49b 100644 (file)
@@ -51,12 +51,6 @@ const ConsoleKitManagerIface = <interface name='org.freedesktop.ConsoleKit.Manag
 </interface>;
 
 const ConsoleKitSessionIface = <interface name='org.freedesktop.ConsoleKit.Session'>
-<method name='IsActive'>
-    <arg type='b' direction='out' />
-</method>
-<signal name='ActiveChanged'>
-    <arg type='b' direction='out' />
-</signal>
 <signal name='Lock' />
 <signal name='Unlock' />
 </interface>;
@@ -109,10 +103,6 @@ const LoginManagerSystemd = new Lang.Class({
         return this._currentSession;
     },
 
-    get sessionActive() {
-        return Shell.session_is_active_for_systemd();
-    },
-
     canPowerOff: function(asyncCallback) {
         this._proxy.CanPowerOffRemote(function(result, error) {
             if (error)
@@ -177,19 +167,6 @@ const LoginManagerConsoleKit = new Lang.Class({
         return this._currentSession;
     },
 
-    get sessionActive() {
-        if (this._sessionActive !== undefined)
-            return this._sessionActive;
-
-        let session = this.getCurrentSessionProxy();
-        session.connectSignal('ActiveChanged', Lang.bind(this, function(object, senderName, [isActive]) {
-            this._sessionActive = isActive;
-        }));
-        [this._sessionActive] = session.IsActiveSync();
-
-        return this._sessionActive;
-    },
-
     canPowerOff: function(asyncCallback) {
         this._proxy.CanStopRemote(function(result, error) {
             if (error)
index 4dbff69883dc341bb9250faa9c3ad972e46cafc8..b3b9d40a2fd3bc1adda59c06adfa2c37346169eb 100644 (file)
@@ -86,7 +86,6 @@ include Makefile-hotplug-sniffer.am
 
 gnome_shell_cflags =                           \
        $(GNOME_SHELL_CFLAGS)                   \
-       $(SYSTEMD_CFLAGS)                       \
        -I$(srcdir)/tray                        \
        -DVERSION=\"$(VERSION)\"                \
        -DLOCALEDIR=\"$(datadir)/locale\"       \
@@ -282,7 +281,6 @@ libgnome_shell_la_LDFLAGS = -avoid-version
 libgnome_shell_la_LIBADD =             \
        -lm                     \
        $(GNOME_SHELL_LIBS)     \
-       $(SYSTEMD_LIBS)         \
        $(BLUETOOTH_LIBS)       \
        libst-1.0.la            \
        libtray.la              \
index 3821b3aff0c8f826a81341ff3045021fd73a853d..0f19efcf34af96d589ff6be6e6aaa3ef95d96d43 100644 (file)
 #include <langinfo.h>
 #endif
 
-#ifdef WITH_SYSTEMD
-#include <systemd/sd-daemon.h>
-#include <systemd/sd-login.h>
-#endif
-
 static void
 stop_pick (ClutterActor       *actor,
            const ClutterColor *color)
@@ -355,29 +350,6 @@ shell_get_file_contents_utf8_sync (const char *path,
   return contents;
 }
 
-/**
- * shell_session_is_active_for_systemd:
- *
- * Checks whether the session we are running in is currently active,
- * i.e. in the foreground and ready for user input.
- *
- * Returns: TRUE if session is active
- */
-gboolean
-shell_session_is_active_for_systemd (void)
-{
-  /* If this isn't systemd, let's assume the session is active. */
-
-#ifdef WITH_SYSTEMD
-  if (sd_booted () <= 0)
-    return TRUE;
-
-  return sd_session_is_active (NULL) != 0;
-#else
-  return TRUE;
-#endif
-}
-
 /**
  * shell_util_wifexited:
  * @status: the status returned by wait() or waitpid()
index 41ba96f4aa09ce4cba59ceda4a061378c789c47d..6fc2a5db0387642b953dbd3c997b1f34440ba178 100644 (file)
@@ -32,8 +32,6 @@ gboolean shell_write_string_to_stream          (GOutputStream    *stream,
 char    *shell_get_file_contents_utf8_sync     (const char       *path,
                                                 GError          **error);
 
-gboolean shell_session_is_active_for_systemd (void);
-
 gboolean shell_util_wifexited                  (int               status,
                                                 int              *exit);